function geoPolygonLayer(options){
	//  layerOptions: {styleMap: styleMap}
	this.layerOptions = options.layerOptions;
	this.style = options.layerOptions.styleMap; 
	var options = OpenLayers.Util.extend({
        displayInLayerSwitcher: false,
        // indicate that the temp vector layer will never be out of range
        // without this, resolution properties must be specified at the
        // map-level for this temporary layer to init its resolutions
        // correctly
        calculateInRange: OpenLayers.Function.True
    }, this.layerOptions);
	
	this.layer = new OpenLayers.Layer.Vector('geoPolygonLayer_for_google_Map', options);
	this.layer.setZIndex(355);
//        	this.line = new OpenLayers.Feature.Vector(
//                    new OpenLayers.Geometry.LineString([this.point.geometry])
//            );
	this.polygons = [];
};


geoPolygonLayer.prototype.display=function(p /*  true or false*/){
	if(this.layer) {
        this.layer.display(p);
    }
};

geoPolygonLayer.prototype.destroy=function(){
	if (this.layer.map != null) {
	    this.layer.destroy(false);
	}
	this.layer = null;
    return true;
};

geoPolygonLayer.prototype.removeAllPolygons=function(){
	if(this.layer) {
        this.layer.removeFeatures(this.polygons);
    }
};

geoPolygonLayer.prototype.removePolygon=function(l){
	var name = l.name;
	for(var i=0; i < this.polygons.length; i++){
    	var ls = this.polygons[i];
    	if(ls.name == name){
    		var removes = this.polygons.splice(i, 1);
    		this.layer.removeFeatures(removes);
    		break;
    	}
    }
};


geoPolygonLayer.prototype.addPolygon=function(l){
	this.layer.setZIndex(355);
	var points = l.points; // GPS_LatLng
	var name = l.name;
//	console.log(l);
	var line = new OpenLayers.Feature.Vector(
			new OpenLayers.Geometry.LinearRing([])
		    );
	line.name = name;
//        	this.layer.addFeatures([line], {silent: true});
	
	for(var i=0; i < points.length; i++){
		var lonlat = points[i];
		var point = new OpenLayers.Feature.Vector(
            new OpenLayers.Geometry.Point(lonlat.lng(), lonlat.lat())
        );
        line.geometry.addComponent(
            point.geometry, line.geometry.components.length
        );
	}
	var polygon = new OpenLayers.Feature.Vector(
            new OpenLayers.Geometry.Polygon([line.geometry])
    );
	polygon.name = name;
//        		this.layer.addFeatures([this.point], {silent: true});
//                this.layer.drawFeature(line, this.style);
	this.layer.addFeatures([polygon], {silent: true});
        
        for(var i=0; i < this.polygons.length; i++){
        	var ls = this.polygons[i];
        	if(ls.name == name){
        		var removes = this.polygons.splice(i, 1);
        		this.layer.removeFeatures(removes);
        		break;
        	}
        }
        this.polygons.push(polygon);
};